package com.paradogs.login;

import com.gitee.sunchenbin.mybatis.actable.manager.handler.StartUpHandler;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author: yumi
 * @date: 2024/10/9  17:24
 * @Description: TODO
 */
@MapperScan({"com.gitee.sunchenbin.mybatis.actable.dao.*", "com.paradogs.login.dao"})
@ComponentScan(basePackages = {"com.gitee.sunchenbin.mybatis.actable.manager.*"})
@SpringBootApplication
public class LoginApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(LoginApplication.class, args);

        /** SpringBoot3.0+ mybatis-actable 兼容 */
        // 容器中获取actable的核心处理类
        StartUpHandler bean = run.getBean(StartUpHandler.class, args);
        // 手动执行actable的建表方法
        bean.startHandler();

    }
}
